<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>wsocket</title>

 <script type="text/javascript" src="<%=request.getContextPath()%>/js/WebSocket.js"></script> 
</head>
<body>
	<div id="dddd">
		<input placeholder="input data click entry" id="chat" />
	</div>
	<script type="text/javascript">
		let inputid = document.getElementById("chat");
		let websocket = new MyWebSocket(inputid,
				'localhost:8080/lcysite/chat/aaaa/SSSS');
		websocket.init();
		let ii = 0;
		websocket.rsocket.onmessage = function(msg) {
			console.log(ii++ + "msg--------------------------");
			console.log(msg.data);
		};
	</script>
</body>
</html>